package com.koocloud.electroplatemanage.mapper;

import com.koocloud.electroplatemanage.pojo.IncomeBasicInfoVo;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;


/**
 * @program: electroplatemanage
 * @description: 来件基本信息Mapper接口层
 * @author: xxc
 * @create: 2020-11-12 16:35
 */
@Mapper
public interface IncomeBasicInfoMapper {

    //根据工单号查询来件基本信息
    IncomeBasicInfoVo selectIncomeBasicInfo(String workOrderNumber);

    //根据零部件图号、零部件名称、图纸版次查询非本次工单号的历史来件基本信息
    List<IncomeBasicInfoVo> selectPastRecords(@Param("workOrderNumber")String workOrderNumber,@Param("drawNo")String drawNo,@Param("partName")String partName,@Param("drawEdition")String drawEdition);

    //查询来件基本信息所有记录
    List<IncomeBasicInfoVo> selectAllData(IncomeBasicInfoVo incomeBasicInfoVo);

    //新增一条来件基础信息数据
    int insert(IncomeBasicInfoVo incomeBasicInfoVo);

    //新增一条来件基础信息数据
    int delete(@Param("id")String id, @Param("userId")String userId, @Param("deleteFlag") String deleteFlag);

    //进入下一步的状态
    int changeState(String workOrderNumber);

    //查看图片id总数
    int selectImgIdCount(String file);
    //查看图片id
    int selectImgId(String file);
    //保存图片
    int insertImg(String file);

    //根据工单号修改来件基本信息
    int update(IncomeBasicInfoVo incomeBasicInfoVo);

    //查询工单号记录数
    int selectWorkOrderNumberCount(String workOrderNumber);


}
